<template>
  <div>
      <!-- 轮播图 -->
      <swiper :lunboList="lunboList" :isfull="true"></swiper>    

      <!-- 九宫格   menu1.png-->    
         <ul class="mui-table-view mui-grid-view mui-grid-9">
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="/home/newsList">
                    <img src="../../images/menu1.png" alt="">
                    <div class="mui-media-body">新闻资讯</div></router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="/home/photoList">
                    <img src="../../images/menu2.png" alt="">
                    <div class="mui-media-body">图片分享</div></router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="/home/goodsList">
                   <img src="../../images/menu3.png" alt="">
                    <div class="mui-media-body">商品购买</div></router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="#">
                    <img src="../../images/menu4.png" alt="">
                    <div class="mui-media-body">location</div></router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="#">
                    <img src="../../images/menu5.png" alt="">
                    <div class="mui-media-body">Search</div></router-link>
            </li>
            <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-4"><router-link to="#">
                    <img src="../../images/menu6.png" alt="">
                    <div class="mui-media-body">Phone</div></router-link>
            </li>
        </ul> 
  </div>
</template>

<script>
import {Toast} from 'mint-ui'
import swiper from '../subcomponents/swiper'//导入轮播子组件
export default {
    data(){
      return {
        lunboList:[]
      }
    },
    methods:{
      getLunbo(){
            this.$http.get('api/getlunbo').then(result=>{
                if(result.body.status === 0){
                    this.lunboList = result.body.message
                    Toast('数据请求成功')
                    console.log(result.body)
                }else{
                    Toast('请求数据失败')
                }
            })
        },
    },
    created(){
      this.getLunbo()
    },
    components:{
        swiper
    }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
  .mint-swipe {
         height: 200px;
         .mint-swipe-item {
             img {
                 width: 100%;
                 height: 100%;
             }
         }
     }

  .mui-grid-view.mui-grid-9 {
         background-color: #fff;
         border: 0;

         .mui-table-view-cell{
             border: 0;

             .mui-media-body{
                 font-size: 13px;
             }
             img {
                 width: 60px;
                 height: 60px;
             }
         }
  }
</style>
